from langchain_openai import ChatOpenAI


def get_llm():
    _llm = ChatOpenAI(
        model='qwen2.5:7b',
        base_url='http://192.168.1.4:11434/v1',
        api_key='ollama'
    )
    return _llm


if __name__ == '__main__':
    print(get_llm().invoke('你好').content)
